#include <iostream>
using namespace std;

const int N = 1e5+10;
int a[N],b[N];

int main() {
    int n,k;
    cin >> n >> k;
    for(int i = 0;i < n;i++)
    {
        cin >> a[i];
    }
    for(int i = 0;i < n;i++)
    {
        cin >> b[i];
    }
    int l = 0,r = 0;
    long long mmax_le = 0,mmax_shy = 0x3f3f3f3f,day = 0;
    long long le = 0,shy = 0;
    while(r < n)
    {
        le += a[r],shy += b[r];
        while(r - l + 1 > k)
        {
            le -= a[l];
            shy -= b[l];
            l++;
        }
        if(r - l + 1== k)
        {
            if(le > mmax_le || (le == mmax_le && mmax_shy > shy) )
            {
                mmax_le = le;
                mmax_shy = shy; 
                day = l;
            }
        }
        
        r++;
    }
    cout << day + 1 << endl;
}
// 64 位输出请用 printf("%lld")